1. Field of the Invention
The present invention relates to an image encoding apparatus and an image decoding apparatus.
2. Description of the Background Art
Hitherto, as methods of obtaining a rotated image or inverted image subjected to compression coding, a method of rotating/inverting a whole image and, after that, performing compression coding on the image and a method of performing compression coding on an image and then rotating/inverting the whole image are known. A technique of dividing an image into a plurality of small regions (tiles) by tiling process and performing a rotating process on a tile unit basis is also conventionally known.
In an input device such as CCD and a display device such as LCD, image data is processed in a raster scan order. Therefore, it is desired that image data be stored in the raster scan order in a memory.
In the method of rotating/inverting a whole image and performing compression coding on the image, a page memory capable of random access is used on the input side and image data is written to the memory by accesses in the direction different from the raster scan order, thereby realizing rotation/inversion of the image. In the method of performing compression coding on an image and rotating/inverting the whole image, a page memory capable of random access is used on the output side and image data is read from the memory by accesses in the direction different from the raster scan order, thereby realizing rotation/inversion of the image.
However, the methods have to use an expensive page memory, the cost is high. Moreover, to store a whole image, a memory having a large storage capacity has to be mounted, and it increases the cost.
In the method of performing the rotating process on the tile unit basis, a memory having a small storage capacity can be used, so that the cost is lower. However, rectangular distortion called tile distortion occurs due to the tiling process and the picture quality is low.